package com.kyk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author 凯
 * @since 2025-09-12
 */
@Getter
@Setter
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 餐厅ID
     */
    private Long restaurantId;

    /**
     * 订单总金额
     */
    private BigDecimal totalAmount;

    /**
     * 配送费
     */
    private BigDecimal deliveryFee;

    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;

    /**
     * 实际支付金额
     */
    private BigDecimal actualAmount;

    /**
     * 联系人姓名
     */
    private String contactName;

    /**
     * 联系人电话
     */
    private String contactPhone;

    /**
     * 配送地址
     */
    private String deliveryAddress;

    /**
     * 期望送达时间
     */
    private LocalDateTime expectDeliveryTime;

    /**
     * 订单备注
     */
    private String remark;

    /**
     * 订单状态: 0-待支付, 1-已支付, 2-餐厅接单, 3-配送中, 4-已完成, 5-已取消, 6-退款中, 7-已退款
     */
    private Byte status;

    /**
     * 支付状态: 0-未支付, 1-已支付, 2-已退款
     */
    private Byte paymentStatus;

    /**
     * 取消原因
     */
    private String cancelReason;

    /**
     * 取消时间
     */
    private LocalDateTime cancelTime;

    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    /**
     * 送达时间
     */
    private LocalDateTime deliveryTime;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;
}
